import logging 
import os 
import time 
import random
import traceback

def log_file_record(fe):
	ltime = time.localtime(time.time())
	timeStr = time.strftime("%Y-%m-%d %H:%M:%S", ltime)
	fileStr = timeStr.split(' ')[0]+'_log'+'.log'	
	data_path = "./log/%s" %fileStr
	logging.basicConfig(filename=data_path)
	fp = open(data_path, 'a')
	fp.write(timeStr+'\n')
	fp.close()
	s=traceback.format_exc()
	logging.error(s)
	fp = open(data_path, 'a')
	fp.write('\n')
	fp.close()